package com.library.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author LDH
 * @since 2022-05-12
 */
@Data
@ApiModel(value = "Books对象", description = "")
@TableName(value = "books")
public class Books implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("书籍编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "书籍名称不能为空！")
    @ApiModelProperty("书名，不能为空！")
    private String bookname;

    @ApiModelProperty("简介")
    private String introduction;

    @NotNull(message = "书籍在馆中的位置不能为空！")
    @ApiModelProperty("书在馆中的位置，不能为空！")
    private String location;

    @NotNull(message = "书籍类型不能为空！")
    @ApiModelProperty("书籍类型，不能为空！")
    private String booktype;

    @ApiModelProperty("书籍是否被借出，0是被借出，1是未被借出，默认为1！")
    private Integer state;

    @ApiModelProperty("书籍封面")
    private String picture;

    @ApiModelProperty("书籍作者")
    private String aut;

}
